package com.yuanhua.sim.gateway.utils;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * RocketMQ消息发送工具
 *
 * @author songguoxiang
 * @return:
 * @date: 2022/8/5 11:42
 */
@Component
public class RocketMQUtils {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    public void messageSend(String topic, Object message) {
        rocketMQTemplate.convertAndSend(topic, message);
        System.out.println("消息队列的消息已经发送拉...");
    }

}
